home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 090 / byte0787.arc / IWPAS.ARC / COMPRESS.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1987-04-28  |  1.3 KB  |  39 lines

  1. PROGRAM Compress(input,output,picfile);
  2.  
  3. { Copyright (c) 1987, Ciarcia's Circuit Cellar          }
  4. {    All Rights Reserved                                }
  5.  
  6. {$U- control-break checking during execution            }
  7. {$C- control-break checking during I/O operations       }
  8. {$R- array range checking                               }
  9.  
  10. {$Ideclares.p                   declarations            }
  11. {$Ihexutil.p                    hex utilities           }
  12. {$Iserial.p                     serial interface code   }
  13. {$Ipictures.p                   picture file code       }
  14. {$Iimages.p                     image processing        }
  15.  
  16.  
  17. BEGIN
  18.  
  19.  LowVideo;
  20.  
  21.  pic1 := NIL;                   { ensure new alloc      }
  22.  PicSetup(pic1);                { set up picture array  }
  23.  
  24.  filespec := GetFSpec(ParamStr(1));
  25.  
  26.  LoadPicture(filespec,pic1);
  27.  
  28.  pic2 := NIL;                   { ensure new alloc      }
  29.  PicSetup(pic2);                { get second array      }
  30.  Writeln('Compressing');
  31.  Compress(pic1,pic2);           { pack picture          }
  32.  
  33.  IF ParamStr(2) <> ''
  34.   THEN filespec := ParamStr(2);
  35.  
  36.  SavePicture(filespec,pic2);
  37.  
  38. END.
  39.